package com.example.managesystem.service.impl;

import com.example.managesystem.dao.postMapper;
import com.example.managesystem.entity.post;
import com.example.managesystem.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class postServiceImpl implements PostService {
    @Autowired
    private postMapper PostMapper;

    @Override
    public String add(post post) {
        PostMapper.add(post);
        return "添加成功";
    }

    @Override
    public List<post> selectPost() {
        return PostMapper.selectPost();
    }

    @Override
    public int update(post post) {
        PostMapper.update(post);
        return 1;
    }

    @Override
    public void delete(String title) {
        PostMapper.delete(title);
    }
}
